package com.itheima.tanhua.web;


import com.itheima.tanhua.Dto.LocationDto;
import com.itheima.tanhua.service.BaiduService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/baidu")
public class BaiduController {

    @Autowired
    private BaiduService baiduService;


    @PostMapping("/location")
    public ResponseEntity location(LocationDto dto) {
        baiduService.baiduLocation(dto);
        return ResponseEntity.ok(null);
    }
}
